An image sensor package using a CCD image sensor or a CMOS image sensor used in a digital camera or a video camera, and a SAW filter package used in a cellular phone or the like are semiconductor devices having a hollow structure. A semiconductor device having a hollow structure has a structure in which, after a semiconductor element is mounted on a wiring substrate and electrodes of the semiconductor element and electrodes of the wiring substrate are electrically connected to each other through use of metal wires, a protective member is attached from above the wiring substrate so as to encapsulate the semiconductor element in a hollow portion.
A semiconductor device having a hollow structure has a problem in that moisture which enters the hollow portion due to moisture absorption by an adhesive made from a resin or by a resin material of a wiring substrate or the like expands by reflow heating when the semiconductor device is mounted on a motherboard, and the vapor pressure of the moisture separates the protective member.
To cope with this problem, in PTL 1, a vent hole is provided between the protective member and a frame. Water vapor in the hollow portion, which has expanded by heating in the mounting, is released from the vent hole to the outside so that vapor pressure caused in the hollow portion is reduced to prevent separation of the protective member.
However, in the method described in PTL 1, the vent hole is always open even when the semiconductor device is not heated, and thus, there is a problem in that the hollow portion is not airtight and foreign matters enter the hollow portion.
Entry of foreign matters into the hollow portion has been a cause of a short circuit between electrically connected terminals. Further, in a semiconductor device which uses an optical element as a semiconductor element, adhesion of foreign matters to a light receiving portion or a light emitting portion of the optical element has been a cause of unsatisfactory optical characteristics.